1. Field of the Invention
The present invention relates to an image processing device and method, and a program therefor, in particular, to an image processing device and method, and a program capable of tracking a subject more stably.
2. Description of the Related Art
In recent related art, there have been image capturing apparatuses that, when successively capturing plural images, for example, when capturing so-called preview images to be displayed to a user before the shutter operation, have a function of tracking a subject, which is selected by a user, on the captured images. In such image capturing apparatuses, some apparatuses have a function of optimally adjusting parameters, such as focal position and luminance, for image capturing in accordance with the position of the tracked subject.
As a method of tracking a subject, for example, there is a method of extracting amounts of features such as luminance information and color information from a region of a part of a subject initially selected by a user in a prescribed frame of an input image and searching for regions which have feature amounts matching with the extracted feature amounts in frames subsequent to the prescribed frame (for example, refer to Japanese Unexamined Patent Application Publication No. 2006-72332). That is, in this method, in the input images of the subsequent frames, regions with feature amounts, which match with the feature amounts of the region of the subject, are searched from the vicinity of the region at the same position as the region initially selected as the subject, and the regions, which can be obtained by the result of the search, are treated as the regions of the subject of the subsequent frames.